Platform Explorer / Nuxeo Platform 6.0

Contribution org.nuxeo.ecm.directory.sql.storage--directories

This contribution is part of XML component org.nuxeo.ecm.directory.sql.storage inside nuxeo-runtime-6.0.jar

Extension Point

Extension point directories of component SQLDirectoryFactory.

Contributed Items

  • <directory name="userDirectory">
    
          <schema>user</schema>
    
          <dataSource>jdbc/nxsqldirectory</dataSource>
    
          <table>users</table>
          <idField>username</idField>
          <passwordField>password</passwordField>
          <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
          <autoincrementIdField>false</autoincrementIdField>
          <computeMultiTenantId>false</computeMultiTenantId>
          <dataFile>users.csv</dataFile>
          <createTablePolicy>on_missing_columns</createTablePolicy>
          <querySizeLimit>50</querySizeLimit>
    
          <references>
            <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>
          </references>
    
        </directory>
  • <directory name="groupDirectory">
    
          <schema>group</schema>
          <dataSource>jdbc/nxsqldirectory</dataSource>
          <table>groups</table>
          <idField>groupname</idField>
          <dataFile>groups.csv</dataFile>
          <createTablePolicy>on_missing_columns</createTablePolicy>
          <autoincrementIdField>false</autoincrementIdField>
    
          <!-- Add 10 min cache to avoid refetching the groups during login --> 
          <cacheTimeout>360</cacheTimeout>
          <cacheMaxSize>1000</cacheMaxSize>
    
          <references>
            <tableReference dataFile="user2group.csv" directory="userDirectory" field="members" schema="user2group" sourceColumn="groupId" table="user2group" targetColumn="userId"/>
            <!-- Warning ! From Nuxeo 5.3.1, a wrong setting has been fixed. See
            http://jira.nuxeo.org/browse/NXP-4401 . Nuxeo upgrades would need a fix in the
            database (inverting parentGroupId and childGroupId in the group2group)  -->
            <tableReference directory="groupDirectory" field="subGroups" schema="group2group" sourceColumn="parentGroupId" table="group2group" targetColumn="childGroupId"/>
            <inverseReference directory="groupDirectory" dualReferenceField="subGroups" field="parentGroups"/>
          </references>
    
        </directory>

XML Source

<extension point="directories" target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory">

    <directory name="userDirectory">

      <schema>user</schema>

      <dataSource>jdbc/nxsqldirectory</dataSource>

      <table>users</table>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
      <autoincrementIdField>false</autoincrementIdField>
      <computeMultiTenantId>false</computeMultiTenantId>
      <dataFile>users.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <querySizeLimit>50</querySizeLimit>

      <references>
        <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>
      </references>

    </directory>

    <directory name="groupDirectory">

      <schema>group</schema>
      <dataSource>jdbc/nxsqldirectory</dataSource>
      <table>groups</table>
      <idField>groupname</idField>
      <dataFile>groups.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <autoincrementIdField>false</autoincrementIdField>

      <!-- Add 10 min cache to avoid refetching the groups during login --> 
      <cacheTimeout>360</cacheTimeout>
      <cacheMaxSize>1000</cacheMaxSize>

      <references>
        <tableReference dataFile="user2group.csv" directory="userDirectory" field="members" schema="user2group" sourceColumn="groupId" table="user2group" targetColumn="userId"/>
        <!-- Warning ! From Nuxeo 5.3.1, a wrong setting has been fixed. See
        http://jira.nuxeo.org/browse/NXP-4401 . Nuxeo upgrades would need a fix in the
        database (inverting parentGroupId and childGroupId in the group2group)  -->
        <tableReference directory="groupDirectory" field="subGroups" schema="group2group" sourceColumn="parentGroupId" table="group2group" targetColumn="childGroupId"/>
        <inverseReference directory="groupDirectory" dualReferenceField="subGroups" field="parentGroups"/>
      </references>

    </directory>

  </extension>